Package-level declarations

Types

Link copied to clipboard
interface BitmapBinarizer

Applies binarization filter to android.graphics.Bitmap.

Link copied to clipboard

Controls generation process. OCR performed as iterator advances. GenerationIterator must be recycled after usage:

Link copied to clipboard
interface OcrPdfGenerator

Provides methods for PDF generation.

Link copied to clipboard
class ScanbotOcrPdfGenerator(context: Context, fileIOProcessor: FileIOProcessor, documentStoreStrategy: DocumentStoreStrategy, pageFileStorage: PageFileStorage, bitmapBinarizer: BitmapBinarizer, blobManager: BlobManager, composerCache: ComposerCache, simpleComposer: SimpleComposer, ocrSettings: OcrSettings, sapManager: SapManager, ocrConfig: OcrEngineManager.OcrConfig) : PdfGenerator, OcrPdfGenerator

Provides methods for PDF generation.

Functions

Link copied to clipboard
fun PdfGenerator.generate(document: Document, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<Unit>

Creates sandwiched OCR PDF file from given Document and provided source list of Page OCR data with provided languages. Uses the document image from a io.scanbot.sdk.docprocessing.Page.

fun PdfGenerator.generate(pages: List<Page>, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<File>
fun PdfGenerator.generate(pages: List<Page>, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<Unit>

Creates sandwiched OCR PDF file from given Page objects and provided source list of Page OCR data with provided languages. Uses the document image from a Page.

fun PdfGenerator.generate(document: Document, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<Unit>

Creates sandwiched OCR PDF file from given Document and provided source list of Page OCR data with provided languages.. Uses the document image from a io.scanbot.sdk.docprocessing.Page.

fun PdfGenerator.generate(imageFileUris: List<Uri>, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<File>
fun PdfGenerator.generate(imageFileUris: List<Uri>, outputFile: File, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<Unit>

Creates sandwiched OCR PDF file from given image file URIs and provided source list of Page OCR data.